<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var date=new Date();//初始化当前时间
			var year=date.getFullYear();//获取完整年份 getFullYear()==124
			var month=date.getMonth()+1;
			var day=date.getDate();
			
			var hour=date.getHours();
			var m=date.getMinutes();
			var s=date.getSeconds();
			
			var days=["星期天","星期一","星期二","星期三","星期四","星期五","星期六"];
			var time=year+"-"+month+"-"+day+" "+hour+":"+m+":"+s+" "+days[date.getDay()];
			document.write(time);
		</script>
	</body>
</html>
